package experiments;

import configuration.Paths;
import character.inventory.InventoryStrategy;
import data.EditorObject;
import data.ObjectDatabase;
import session.Session;
import main.Core;

public class InventoryCreationTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.err.println("Start Core");
		Core.getInstance().startup();
		System.err.println("Load Project");
		System.err.println(Paths.projectDataPath);
		Session.getInstance().loadProject("Test Project");
		ObjectDatabase.getInstance().addEditorObject(
				InventoryStrategy.class.getCanonicalName()).getGUID();
		for (EditorObject e : ObjectDatabase.getInstance()
				.getAllEditorObjectsOfClass(
						InventoryStrategy.class.getCanonicalName()).values()) {
			System.err.println(e.getData().getDisplayName()
					+ " = "
					+ e.getData().get("title"));
		}
		System.err.println("Close Project");
		Session.getInstance().closeProject();
		System.err.println("Shutdown Core");
		Core.getInstance().shutdown();

		System.err.println("Start Core");
		Core.getInstance().startup();
		System.err.println("Load Project");
		System.err.println(Paths.projectDataPath);
		Session.getInstance().loadProject("Test Project");
		for (EditorObject e : ObjectDatabase.getInstance()
				.getAllEditorObjectsOfClass(
						InventoryStrategy.class.getCanonicalName()).values()) {
			System.err.println(e.getData().getDisplayName()
					+ " = "
					+ e.getData().get("title"));
		}
		System.err.println("Close Project");
		Session.getInstance().closeProject();
		System.err.println("Shutdown Core");
		Core.getInstance().shutdown();
	}
}
